-- GENERATED SPELL FOR [Gri'lek] --


function spell0_15082(pUnit, Event) --@Avatar,Self--
pUnit:FullCastSpellOnTarget(24646,pUnit)
pUnit:RegisterEvent('Sorts_15082', 15342, 1)
end

function spell1_15082(pUnit, Event) --@Entangling Roots,n/a--
pUnit:FullCastSpellOnTarget(24648,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15082', 10000, 1)
end

function spell2_15082(pUnit, Event) --@Ground Tremor,Self--
pUnit:FullCastSpellOnTarget(6524,pUnit)
pUnit:RegisterEvent('Sorts_15082', 2000, 1)
end

function spell3_15082(pUnit, Event) --@Stun,Self--
pUnit:FullCastSpellOnTarget(24647,pUnit)
pUnit:RegisterEvent('Sorts_15082', 2292, 1)
end

function Sorts_15082(pUnit, Event)
local choix_sorts_15082 = math.random(0, 3)
if choix_sorts_15082 == 0 then
pUnit:RegisterEvent('spell0_15082', 1, 1)
end
if choix_sorts_15082 == 1 then
pUnit:RegisterEvent('spell1_15082', 1, 1)
end
if choix_sorts_15082 == 2 then
pUnit:RegisterEvent('spell2_15082', 1, 1)
end
if choix_sorts_15082 == 3 then
pUnit:RegisterEvent('spell3_15082', 1, 1)
end
end

function mob15082_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_15082', math.random(1500, 3000), 1)
end

function mob15082_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15082_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15082_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(15082, 1, 'mob15082_Action')
RegisterUnitEvent(15082, 2, 'mob15082_Leave')
RegisterUnitEvent(15082, 3, 'mob15082_Kill')
RegisterUnitEvent(15082, 4, 'mob15082_Die')
